Ti Pro25 Smart Cat Litter Box#5585
Conversation
|
Hey @make-all is there a way to run the checks locally? It's my first time making a PR for this project. |
|
I think I should have enabled workflows actions for the fork, seems to work now and also there aren't any errors anymore. |
| value: "kg" | ||
| - dps_val: "kilogram" | ||
| value: "lb" | ||
| # mapping: |
There was a problem hiding this comment.
Revert this change, the units passed to HA must match what is expected.
There was a problem hiding this comment.
I think I need some help, it worked at first, I've committed, then I've done a restart and the value doesn't change anymore. If I remove the mapping it's working but it's displaying the wrong unit, since they are reversed. Also it is generating a warning because of the values mapping in HA.
I'm not sure what to do at this point.
There was a problem hiding this comment.
is there something related to the fact that I'm mapping the value both for "Cat Weight" and for the "unit" select?
There was a problem hiding this comment.
If the UI is converting the units, then the value not changing in the UI when the units are changed in the device would be correct.
There was a problem hiding this comment.
With the mapping on the unit in "cat weight", the value and the unit of the value doesn't change and the value in pounds is always displayed.
If I remove the mapping for the unit in "cat weight", then it is working as expected but the value of the unit is reversed, because the value for the dps is reversed.
There was a problem hiding this comment.
I think I understand now, my HA has unit_system: metric which should display the values in kg. The problem is the Unit dps 116 is reverted. HA will try to display the value in kg but since it is reverted it will always display it the other way around.
There was a problem hiding this comment.
Is there a way to condition by the units of HA instead of the dps 116?
There was a problem hiding this comment.
You are thinking about the problem wrong.
There is a device setting for units, the device will use that.
There is a UI setting for HA, which HA will use.
When everything is set up properly, the above two should match. This is a one time setup by the user, and it is unlikely they will want to change that with any frequency.
When they do not match, then HA will see that the device is using different units, and will convert the units for display. So when the device config is correct, you should see no effect in the HA UI (or only within rounding error change) when switching the device unit.
There was a problem hiding this comment.
With the mapping on the unit in "cat weight", the value and the unit of the value doesn't change and the value in pounds is always displayed. If I remove the mapping for the unit in "cat weight", then it is working as expected but the value of the unit is reversed, because the value for the dps is reversed.
The config appears to have been correct back here. But I am not sure which commit this was (or even if you committed this, or was it just a local test?)
There was a problem hiding this comment.
I've added the class back. I tried to change the unit system in HA from metric to better understand the conversion, and I noticed it was set in configuration.yaml, I removed it from there, set it from UI, and now it's working displaying the weight in kg.
Ti Pro25 Smart Cat Litter Box support.
The device is also found as: iHunt Smart Cat Litter V1
dps that are not mapped:
134 - weight in lb, the cat weight is displayed in kg or lb when changing the unit, this is not necessary
109 - odor removal, seems to be internal
110 - sleep mode, seems to be internal for schedule
106, 107, 108 - autocleaning with schedule configs
112, 119, 121, 122, 128, 129 - didn't find buttons in the app
115 - calibration could not find a button in the app
My request support for this device: #5541